package com.csu.soa_library.service.Impl;

import com.csu.soa_library.dao.demo;
import com.csu.soa_library.entity.Book;
import com.csu.soa_library.service.demoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author YiGongLily
 * @version V1.0
 * Copyright (c) 2024, bie blind copy all thing fine.
 * @ProjectName:soa_library
 * @Title: demoServiceImpl
 * @Package com.csu.soa_library.service.Impl
 * @Description: demo
 * @date 2024/11/25 21:07
 */
@Service
public class demoServiceImpl implements demoService {
    @Autowired
    private demo demo;
    @Override
    public Book getBookById(Long id) {
        return demo.findById(id).orElseThrow(RuntimeException::new);
    }
}
